-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ament_lint_cmake line length expression #236
Conversation
This regular expression is using the re.VERBOSE flag, meaning that characters after an un-escaped '#' character are interpreted as a comment and are not part of the expression. Signed-off-by: Scott K Logan <logans@cottsay.net>
I'm setting this in the CMake instead of the cmakelint source code to avoid further diverging from the upstream cmakelint code. Signed-off-by: Scott K Logan <logans@cottsay.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! (when CI is green)
If the max line length is changed again to make more packages pass, that still looks good to me.
Signed-off-by: Scott K Logan <logans@cottsay.net>
The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan <logans@cottsay.net>
The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan <logans@cottsay.net>
The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan <logans@cottsay.net>
The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan <logans@cottsay.net>
The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan <logans@cottsay.net>
The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan <logans@cottsay.net>
The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan <logans@cottsay.net>
The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan <logans@cottsay.net>
The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan <logans@cottsay.net>
The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan <logans@cottsay.net>
The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan <logans@cottsay.net>
The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan <logans@cottsay.net>
The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan <logans@cottsay.net>
The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan <logans@cottsay.net>
The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan <logans@cottsay.net>
This is probably the cause of some failing tests in CI, like: https://ci.ros2.org/view/nightly/job/nightly_osx_release/1964/ . I'm guessing that we just need to fix up the cmake files in |
The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan <logans@cottsay.net>
The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan <logans@cottsay.net>
The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan <logans@cottsay.net>
The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan <logans@cottsay.net>
This regular expression is using the re.VERBOSE flag, meaning that characters after an un-escaped '#' character are interpreted as a comment and are not part of the expression. From what I can tell, this has been broken ever since the code was introduced. We've essentially only been getting proper line length detection for strings in a
message()
call.Unfortunately, there are currently 792 line length violations in ROS 2 that have been unnoticed because of this bug:
Personally, I believe that 80 characters may be a bit aggressive for CMake. Maybe we should try changing this limit to a larger number, fix the violations and merge this fix to prevent more regressions, and then maybe bring the limit down once the enforcement is working right. I'm open to suggestions.